@*
 *Author：jxx
 *Contact：283591387@qq.com
 *Date：2018-07-01
 * 此代码由框架生成，请勿随意更改
 *@
@{
    Layout = "~/Views/Shared/ManagerLayout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
    <div style=" padding: 0px 5px 0px 2px; height: 100%;">

        <div id="lay-search-panel" class="panel lay-panel" style=" margin-bottom: 5px;border:0px;">
        </div>
        <div id="lay-reslut" class=" lay-reslut ">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>

@{await Html.RenderPartialAsync("~/Views/Shared/Uploader.cshtml");}



<script>
    @{ViewBag.dropDownIds = "gender,roles,ut,isphone,enable";}
    var searchData = [[{"columnType":"string","dataSource":[],"displayType":"","text":"用户名","require":false,"id":"UserName"},{"columnType":"bool","dataSource":optionConfiggender,"displayType":"drop","text":"性别","require":false,"id":"Gender"},{"columnType":"string","dataSource":[],"displayType":"","text":"用户真实姓名","require":false,"id":"UserTrueName"}],[{"columnType":"string","dataSource":[],"displayType":"","text":"部门","require":false,"id":"DeptName"},{"columnType":"string","dataSource":optionConfigroles,"displayType":"drop","text":"角色","require":false,"id":"Role_Id"},{"columnType":"string","dataSource":[],"displayType":"","text":"Token","require":false,"id":"Token"}],[{"columnType":"int","dataSource":optionConfigut,"displayType":"dropList","text":"登陆设备类型","require":false,"id":"AppType"},{"columnType":"int","dataSource":optionConfigisphone,"displayType":"drop","text":"是否手机用户","require":false,"id":"IsRegregisterPhone"},{"columnType":"string","dataSource":[],"displayType":"","text":"手机号","require":false,"id":"PhoneNo"}],[{"columnType":"string","dataSource":[],"displayType":"","text":"地址","require":false,"id":"Address"},{"columnType":"string","dataSource":[],"displayType":"","text":"Email","require":false,"id":"Email"},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否可用","require":false,"id":"Enable"}],[{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"注册时间","require":false,"id":"CreateDate"},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"最后登陆时间","require":false,"id":"LastLoginDate"}]];
    var editData = [[{"columnType":"string","dataSource":[],"displayType":"","text":"用户名","require":true,"id":"UserName","fileMaxCount":1,"disabled":1},{"columnType":"string","dataSource":[],"displayType":"text","text":"用户真实姓名","require":true,"id":"UserTrueName","fileMaxCount":1}],[{"columnType":"string","dataSource":optionConfigroles,"displayType":"drop","text":"角色","require":true,"id":"Role_Id","fileMaxCount":1},{"columnType":"int","dataSource":optionConfigisphone,"displayType":"drop","text":"是否手机用户","require":true,"id":"IsRegregisterPhone","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"text","text":"地址","require":false,"id":"Address","fileMaxCount":1},{"columnType":"string","dataSource":[],"displayType":"text","text":"电话","require":false,"id":"Mobile","fileMaxCount":1}],[{"columnType":"bool","dataSource":optionConfiggender,"displayType":"drop","text":"性别","require":false,"id":"Gender","fileMaxCount":1},{"columnType":"string","dataSource":[],"displayType":"","text":"Token","require":false,"id":"Token","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"text","text":"Email","require":false,"id":"Email","fileMaxCount":1},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否可用","require":true,"id":"Enable","fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"","text":"创建人","require":false,"id":"Creator","fileMaxCount":1,"disabled":1},{"columnType":"datetime","dataSource":[],"displayType":"","text":"注册时间","require":false,"id":"CreateDate","fileMaxCount":1,"disabled":1}],[{"columnType":"string","dataSource":[],"displayType":"textarea","text":"备注","require":false,"id":"Remark","colSize":12,"fileMaxCount":1}],[{"columnType":"string","dataSource":[],"displayType":"file","text":"头像","require":false,"id":"HeadImageUrl","fileMaxCount":1}]];


    var gridParameters = {
        loadMsg: '数据正在加载。。。。',
        //rownumbers: true,
        pageSize: 30,
        pageList: [10, 20, 30, 50, 80, 100, 200, 500, 1000],
        height: 340,
        key:'User_Id',
        url: '/Sys_User/GetPageData',
        nameSpace:'',
        queryParams: {TableName:'Sys_User',sort:'User_Id',Foots:' ',Wheres:'{}'},
        pagination: true,
        striped:true,
        fileLink:true,
        richText:false,
        hasSection:false,
        cnName:'用户管理',
        calculateHeight:{id:'#lay-search-panel'},
        calculateWidth:{id:'#lay-search-panel',totalWidth:3380,totalCol:25},
    frozenColumns: [[
     { field: 'ck', checkbox: true }
    ]],
    //showFooter: true,
        columns: [[{field:'User_Id',title:'User_Id',datatype:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'UserName',title:'用户名',datatype:'string',width:120,readonly:true,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createViewField',{row:row,val:val,index:index})},require:true,align:'left',sortable:true},
                       {field:'Gender',title:'性别',datatype:'bool',width:100,editor: { type: 'combobox', options: optionConfiggender },formatter: function (val, row, index) {
    return dataSourcegender.textFormatter(optionConfiggender, val, row, index);
    },
align:'left'},
                       {field:'HeadImageUrl',title:'头像',datatype:'string',width:150,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createImageUrl',{row:row,key:'HeadImageUrl'})},align:'left'},
                       {field:'Dept_Id',title:'Dept_Id',datatype:'int',width:90,hidden:true,align:'left'},
                       {field:'DeptName',title:'部门',datatype:'string',width:150,align:'left'},
                       {field:'Role_Id',title:'角色',datatype:'string',width:150,editor: { type: 'combobox', options: optionConfigroles },formatter: function (val, row, index) {
    return dataSourceroles.textFormatter(optionConfigroles, val, row, index);
    },
require:true,align:'left'},
                       {field:'RoleName',title:'RoleName',datatype:'string',width:90,hidden:true,require:true,align:'left'},
                       {field:'Token',title:'Token',datatype:'string',width:180,editor:'text',align:'left'},
                       {field:'AppType',title:'登陆设备类型',datatype:'int',width:150,formatter: function (val, row, index) {
    return dataSourceut.textFormatter(optionConfigut, val, row, index);
    },
align:'left'},
                       {field:'UserTrueName',title:'用户真实姓名',datatype:'string',width:150,editor:'text',require:true,align:'left'},
                       {field:'IsRegregisterPhone',title:'是否手机用户',datatype:'int',width:120,editor: { type: 'combobox', options: optionConfigisphone },formatter: function (val, row, index) {
    return dataSourceisphone.textFormatter(optionConfigisphone, val, row, index);
    },
require:true,align:'left'},
                       {field:'Address',title:'地址',datatype:'string',width:190,editor:'text',align:'left'},
                       {field:'Mobile',title:'电话',datatype:'string',width:140,editor:'text',align:'left'},
                       {field:'PhoneNo',title:'手机号',datatype:'string',width:150,align:'left'},
                       {field:'Email',title:'Email',datatype:'string',width:140,editor:'text',align:'left'},
                       {field:'Tel',title:'Tel',datatype:'string',width:90,hidden:true,align:'left'},
                       {field:'Remark',title:'备注',datatype:'string',width:180,editor:'text',align:'left'},
                       {field:'OrderNo',title:'排序号',datatype:'int',width:90,align:'left'},
                       {field:'CreateID',title:'CreateID',datatype:'int',width:90,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',datatype:'string',width:130,readonly:true,editor:'text',align:'left'},
                       {field:'CreateDate',title:'注册时间',datatype:'DateTime',width:150,readonly:true,editor:'text',align:'left',sortable:true},
                       {field:'Enable',title:'是否可用',datatype:'byte',width:90,editor: { type: 'combobox', options: optionConfigenable },formatter: function (val, row, index) {
    return dataSourceenable.textFormatter(optionConfigenable, val, row, index);
    },
require:true,align:'left'},
                       {field:'ModifyID',title:'ModifyID',datatype:'int',width:90,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',datatype:'string',width:130,readonly:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',datatype:'DateTime',width:90,readonly:true,align:'left',sortable:true},
                       {field:'Auditing',title:'审核状态',datatype:'int',width:90,align:'left'},
                       {field:'Auditor',title:'审核人',datatype:'string',width:90,align:'left'},
                       {field:'AuditDate',title:'审核时间',datatype:'DateTime',width:150,align:'left',sortable:true},
                       {field:'LastLoginDate',title:'最后登陆时间',datatype:'DateTime',width:150,align:'left',sortable:true},
                       {field:'LastModifyPwdDate',title:'最后密码修改时间',datatype:'DateTime',width:150,align:'left',sortable:true}]]
    };

    var $elementGrid;
    window.onload = function () {
        $elementGrid = $('#dataGrid').datagrid(gridParameters);
    }

    var $elementDetailGrid;
    var gridDetailParameters = '';
</script>
